home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / DELPHI / NWLIB.ZIP / DEMO.ZIP / LIST.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-08-12  |  21.2 KB  |  630 lines

  1. {This unit provides a generic listbox control and buttons, whose
  2. events can be assigned to procedures stored within the body of THIS
  3. unit, not the calling unit.  Other units can assign these internal
  4. procedures to the available buttons, events, etc. programmatically.
  5.  
  6. The event-handling procedures contained in this unit could certainly
  7. be placed inside the calling unit for good organizational practices.
  8. They are placed in this unit simply to increase clarity of the
  9. NWLib demo program by reducing interface code. }
  10.  
  11. unit List;
  12.  
  13. interface
  14.  
  15. uses
  16.     sysUtils,
  17.     WinTypes,
  18.     WinProcs,
  19.     Classes,
  20.     Graphics,
  21.     Forms,
  22.     Controls,
  23.     Buttons,
  24.     StdCtrls,
  25.     ExtCtrls,
  26.     Grids,
  27.     dialogs,
  28.     Nwtools,
  29.     Nwlib,
  30.     NwProp, 
  31.     NWprint;
  32.  
  33. type
  34.   TwinList = class(TForm)
  35.     Panel1: TPanel;
  36.     buttonPanel: TPanel;
  37.     listGrid: TStringGrid;
  38.     Button1: TButton;
  39.     Button2: TButton;
  40.     Button3: TButton;
  41.     Button4: TButton;
  42.     NWLib1: TNWLib;
  43.     NWTools1: TNWTools;
  44.     NWProp1: TNWProp;
  45.     NWPrint1: TNWPrint;
  46.     procedure FormPaint(Sender: TObject);
  47.     procedure FormShow(Sender: TObject);
  48.   private
  49.     { Private declarations }
  50.   public
  51.     { Public declarations }
  52.     inObjectName : string ;
  53.     inServer     : TNWConnHandle ;
  54.     inQueue      : TObjID ;
  55.     procedure onPrintJobsShow(sender : TObject) ;
  56.     procedure onPropertiesShow(sender : TObject)  ;
  57.     procedure onGroupShow(sender : TObject)  ;
  58.     procedure onRightsShow(sender : TObject)  ;
  59.     procedure onMemberShow(sender : TObject)  ;
  60.     procedure UserAddGroup(sender : TObject) ;
  61.     procedure groupAddUser(sender : TObject) ;
  62.     procedure userDelFromGroup(sender  : TObject) ;
  63.     procedure groupDelUser(sender  : TObject) ;
  64.     procedure objSeeObjectInfo(sender  : TObject) ;
  65.     procedure showPropertyInfo(sender  : TObject) ;
  66.     procedure createNewProperty(sender : TObject) ;
  67.     procedure deleteObjProperty(sender : TObject) ;
  68.     procedure addNewRight(sender : TObject) ;
  69.     procedure deleteRight(sender : TObject) ;
  70.     procedure editRight(sender : TObject) ;
  71.     procedure queueJobInfo(sender : TObject) ;
  72.     procedure queueJobDelete(sender : TObject) ;
  73.   end;
  74.  
  75. var
  76.   winList: TwinList;
  77.  
  78. implementation
  79.  
  80. {$R *.DFM}
  81.  
  82. uses
  83.   trustee ;
  84.  
  85. procedure TwinList.FormShow(Sender: TObject);
  86.   {set grid's lineheight to current font (nwtools.pas)}
  87.   begin
  88.     autoGridLineHeight(listGrid) ;
  89.   end;
  90.  
  91. procedure TwinList.FormPaint(Sender: TObject);
  92.   {enable/disable buttons}
  93.   begin
  94.     button1.enabled := (listGrid.rowCount > 1) ;
  95.     button2.enabled :=  button1.enabled ;
  96.     button3.enabled :=  button1.enabled ;
  97.   end;
  98.  
  99. {********************* formShow methods **********************}
  100.  
  101. procedure TWinList.onPrintJobsShow(sender : TObject) ;
  102.   { used when a print queue is double-clicked to show jobs}
  103.   var
  104.     ncursor  : TCursor ;
  105.     tempList : TStringList ;
  106.     nLoop    : word ;
  107.   begin
  108.     ncursor       := screen.cursor ;
  109.     screen.cursor := crHourglass ;
  110.     tempList      := TStringList.create ;
  111.     caption       := 'Print Queue Contents' ;
  112.     { Edit listGrid's Button Properties }
  113.     { Loads onClick events, edits captions }
  114.     button1.caption := '&Delete'   ;
  115.     button2.caption := '&Info'     ;
  116.     button3.caption := '&Refresh'  ;
  117.     button4.caption := '&Quit'     ;
  118.     button1.onClick := queueJobDelete ;
  119.     button2.onClick := queueJobInfo ;
  120.     button3.onClick := onPrintJobsShow ;
  121.     button4.modalResult := mrCancel ;
  122.  
  123.     {get queue jobs and fill up the grid}
  124.     if getQueueJobList(inServer,
  125.                        getObjName(inServer,inQueue),
  126.                        tempList) then
  127.       begin
  128.         listGrid.rowCount    := (tempList.count+1) ;
  129.         listGrid.cells[0,0]  := 'Owner        Status     Description'  ;
  130.         listGrid.onDblClick  := button3.onClick    ;
  131.         for nLoop := 1 to tempList.count do begin
  132.           listGrid.cells[0,nloop] := tempList[nloop-1] ;
  133.           listGrid.cells[1,nloop] := intToStr(TNWQueueJobID(tempList.objects[nloop-1])) ;
  134.         end;
  135.         if (listGrid.rowCount > 1) then
  136.           begin
  137.             listGrid.fixedRows := 1 ;
  138.             listGrid.row := 1 ;
  139.           end;
  140.       end;
  141.     tempList.free ;
  142.     screen.cursor := ncursor ;
  143.   end;
  144.  
  145.  
  146. procedure TWinList.onGroupShow(sender : TObject)  ;
  147.   { used when objEdit's 'My Groups' button is selected }
  148.   var
  149.     ncursor  : TCursor ;
  150.     tempList : TStringList ;
  151.     nLoop    : word ;
  152.   begin
  153.     ncursor       := screen.cursor ;
  154.     screen.cursor := crHourglass ;
  155.     tempList      := TStringList.create ;
  156.     caption       := inObjectName + ': Groups I''m In' ;
  157.     { Edit listGrid's Button Properties }
  158.     { Loads onClick events, edits captions }
  159.     button1.caption := '&Add'     ;
  160.     button2.caption := '&Delete'  ;
  161.     button3.caption := '&Info'    ;
  162.     button4.caption := '&Quit'    ;
  163.     button1.onClick := userAddGroup     ;
  164.     button2.onClick := userDelFromGroup ;
  165.     button3.onClick := objSeeObjectInfo ;
  166.     button4.modalResult := mrCancel ;
  167.     { Edit and Fill Up the listGrid }
  168.     tempList := getMyGroups(inServer,
  169.                             inObjectName) ;
  170.     listGrid.rowCount     := (tempList.count+1) ;
  171.     listGrid.cells[0,0]   := 'Group Name'       ;
  172.     listGrid.onDblClick   := button3.onClick    ;
  173.     for nLoop := 1 to tempList.count do
  174.       listGrid.cells[0,nloop] := tempList[nloop-1] ;
  175.     if (listGrid.rowCount > 1) then
  176.       begin
  177.         listGrid.fixedRows := 1 ;
  178.         listGrid.row := 1 ;
  179.       end;
  180.     tempList.free ;
  181.     screen.cursor := ncursor ;
  182.   end;
  183.  
  184. procedure TWinList.onMemberShow(sender : TObject)  ;
  185.   { used when objEdit's or winList's 'Members' button is selected }
  186.   var
  187.     ncursor  : TCursor ;
  188.     tempList : TStringList ;
  189.     nLoop    : word ;
  190.   begin
  191.     ncursor       := screen.cursor ;
  192.     screen.cursor := crHourglass ;
  193.     tempList      := TStringList.create ;
  194.     caption       := inObjectName + ': Group Members' ;
  195.     { Edit listGrid's Button Properties }
  196.     { Loads onClick events, edits captions }
  197.     button1.caption := '&Add'     ;
  198.     button2.caption := '&Delete'  ;
  199.     button3.caption := '&Info'    ;
  200.     button4.caption := '&Quit'    ;
  201.     button1.onClick := groupAddUser ;
  202.     button2.onClick := groupDelUser ;
  203.     button3.onClick := objSeeObjectInfo ;
  204.     button4.modalResult := mrCancel ;
  205.     { Edit and Fill Up the listGrid }
  206.     tempList := GetMemberList(inServer,
  207.                               inObjectName,
  208.                               True) ;
  209.     listGrid.rowCount     := tempList.count+1 ;
  210.     listGrid.cells[0,0]   := 'User ID'        ;
  211.     listGrid.onDblClick   := button3.onClick  ;
  212.     for nLoop := 1 to tempList.count do
  213.       listGrid.cells[0,nloop] := tempList[nloop-1] ;
  214.     if (listGrid.rowCount > 1) then
  215.       begin
  216.         listGrid.fixedRows := 1 ;
  217.         listGrid.row := 1 ;
  218.       end;
  219.     screen.cursor := ncursor ;
  220.     tempList.free ;
  221.   end;
  222.  
  223.  
  224. procedure TWinList.onPropertiesShow(sender : TObject)  ;
  225.   { used when objEdit's 'Properties' button is selected }
  226.   var
  227.     ncursor  : TCursor ;
  228.     tempList : TStringList ;
  229.     nLoop    : word ;
  230.   begin
  231.     ncursor       := screen.cursor ;
  232.     screen.cursor := crHourglass ;
  233.     tempList      := TStringList.create ;
  234.     caption       := inObjectName + ': Valid Properties' ;
  235.     { Edit listGrid's Button Properties }
  236.     { Loads onClick events, edits captions }
  237.     button1.caption := '&Add'     ;
  238.     button2.caption := '&Delete'  ;
  239.     button3.caption := '&Info'    ;
  240.     button4.caption := '&Quit'    ;
  241.     button1.onClick := createNewProperty ;
  242.     button2.onClick := deleteObjProperty ;
  243.     button3.onClick := showPropertyInfo ;
  244.     button4.modalResult := mrCancel ;
  245.     { Edit and Fill Up the listGrid }
  246.     listGrid.rowCount     := tempList.count+1 ;
  247.     listGrid.cells[0,0]   := 'Property Name'     ;
  248.     listGrid.onDblClick   := button3.onClick  ;
  249.     tempList := getPropertyList(inServer,inObjectName,'*') ;
  250.     listGrid.rowCount     := (tempList.count+1) ;
  251.     for nLoop := 1 to tempList.count do
  252.       listGrid.cells[0,nloop] := tempList[nloop-1] ;
  253.     if (listGrid.rowCount > 1) then
  254.       begin
  255.         listGrid.fixedRows := 1 ;
  256.         listGrid.row := 1 ;
  257.       end;
  258.     screen.cursor := ncursor ;
  259.     tempList.free ;
  260.   end;
  261.  
  262. procedure TWinList.onRightsShow(sender : TObject)  ;
  263.   { used when objEdit's 'Rights' button is selected }
  264.   var
  265.     ncursor  : TCursor ;
  266.     tempList : TStringList ;
  267.     nLoop    : word ;
  268.   begin
  269.     ncursor       := screen.cursor ;
  270.     screen.cursor := crHourglass ;
  271.     tempList      := TStringList.create ;
  272.     caption       := inObjectName + ': Trustee Directory Rights' ;
  273.     { Edit listGrid's Button Properties }
  274.     { Loads onClick events, edits captions }
  275.     button1.caption := '&Add'     ;
  276.     button2.caption := '&Delete'  ;
  277.     button3.caption := '&Edit'    ;
  278.     button4.caption := '&Quit'    ;
  279.     button1.onClick := addNewRight ;
  280.     button2.onClick := deleteRight ;
  281.     button3.onClick := editRight ;
  282.     button4.modalResult := mrCancel ;
  283.     { Edit and Fill Up the listGrid }
  284.     listGrid.rowCount     := tempList.count+1 ;
  285.     listGrid.cells[0,0]   := 'Path/Rights'    ;
  286.     listGrid.onDblClick   := button3.onClick  ;
  287.     tempList := getTrusteeList(inServer,inObjectName) ;
  288.     listGrid.rowCount     := (tempList.count+1) ;
  289.     for nLoop := 1 to tempList.count do
  290.       listGrid.cells[0,nloop] := tempList[nloop-1] ;
  291.     if (listGrid.rowCount > 1) then
  292.       begin
  293.         listGrid.fixedRows := 1 ;
  294.         listGrid.row := 1 ;
  295.       end;
  296.     tempList.free ;
  297.     screen.cursor := ncursor ;
  298.   end;
  299.  
  300. { ******************* Stored Button Procedure Code ******************** }
  301.  
  302. procedure TWinList.editRight(sender : TObject) ;
  303.   var
  304.     rightsList : TNWRights   ;
  305.     pathInfo   : TNWPathInfo ;
  306.     tempList   : TStringList ;
  307.     nloop      : word        ;
  308.     cPath      : string ;
  309.   begin
  310.     cpath := strExtract(listGrid.cells[0,listGrid.row],' ',1) ;
  311.     if parseNetwarePath(inServer,
  312.                         cpath,
  313.                         pathInfo) then 
  314.       begin
  315.         try
  316.           application.createForm(TWinTrustee,winTrustee)           ;
  317.           winTrustee.serverName.text := getServerName(inServer)    ;
  318.           winTrustee.volName.text    := pathInfo.volumeName        ;
  319.           winTrustee.pathName.text   := pathInfo.pathOnly          ;
  320.           winTrustee.oldPath         := pathInfo.pathOnly          ;
  321.           winTrustee.oldVolName      := pathInfo.volumeName        ;
  322.           winTrustee.oldServer       := winTrustee.serverName.text ;
  323.           winTrustee.nServer         := inServer     ;
  324.           winTrustee.cUserID         := inObjectName ;
  325.           winTrustee.creating        := false        ;
  326.           {get rights, then enable rights checkboxes}
  327.           if getObjectDirRights(inServer,
  328.                                 inObjectName,
  329.                                 cPath,
  330.                                 rightsList) then 
  331.             begin
  332.               with rightsList do begin
  333.                 winTrustee.lRead.checked          := read          ;
  334.                 winTrustee.lWrite.checked         := write         ;
  335.                 winTrustee.lCreate.checked        := create        ;
  336.                 winTrustee.lErase.checked         := erase         ;
  337.                 winTrustee.lModify.checked        := modify        ;
  338.                 winTrustee.lFileScan.checked      := fileScan      ;
  339.                 winTrustee.lAccessControl.checked := accessControl ;
  340.                 winTrustee.lSupervisor.checked    := supervisor    ;
  341.               end;
  342.               winTrustee.showModal ;
  343.               if winTrustee.execute then
  344.                 okBox('Trustee Rights Edited;;Update Your Listbox Items Here');
  345.             end;
  346.         finally
  347.           winTrustee.free ;
  348.         end;
  349.       end 
  350.     else
  351.       alertBox('Unknown Path Specification;;Play it Again, Sam') ; 
  352.   end;
  353.  
  354. procedure TWinList.deleteRight(sender : TObject) ;
  355.   var
  356.     ctemp : string ;
  357.   begin
  358.     ctemp := listGrid.cells[0,listGrid.row] ;
  359.     if noYesBox(ctemp +
  360.                 ';;Permanently Deleting Trustee Right;;Are You Sure?') then
  361.       begin
  362.         if deleteTrusteeRight(inServer,
  363.                               inObjectName,
  364.                               '',
  365.                               ctemp) then
  366.           okBox('Trustee Right Deleted;;Update Your Listbox Items Here')
  367.         else
  368.           alertBox('Error Deleting Trustee Right!') ;
  369.       end;
  370.   end;
  371.  
  372. procedure TWinList.addNewRight(sender : TObject) ;
  373.   var
  374.     rightsList : TNWRights ;
  375.   begin
  376.     try
  377.       application.createForm(TWinTrustee,winTrustee) ;
  378.       winTrustee.serverName.text := getServerName(inServer) ;
  379.       winTrustee.volName.text    := 'SYS:' ;
  380.       winTrustee.pathName.text   := '\'    ;
  381.       winTrustee.nServer         := inServer     ;
  382.       winTrustee.cUserID         := inObjectName ;
  383.       winTrustee.creating        := true ;
  384.       winTrustee.showModal ;
  385.       if winTrustee.execute then
  386.         okBox('Trustee Right Added;;Update Your Listbox Items Here');
  387.     finally
  388.       winTrustee.free ;
  389.     end;
  390.   end;
  391.  
  392. procedure TWinList.groupAddUser(sender : TObject) ;
  393.   var
  394.     cuser   : string ;
  395.     tempList : TStringList ;
  396.     nLoop    : word ;
  397.   begin
  398.     cuser := space(80) ;
  399.     if inputQuery('Add User to Group ' + inObjectName,
  400.                   'User Name',cUser) then
  401.       begin
  402.         try
  403.           cuser := upperCase(allTrim(cuser)) ;
  404.           if (getObjType(0,cuser) = nw_user) then
  405.             begin
  406.               tempList := TStringList.create  ;
  407.               if addUserToGroup(inServer,
  408.                                 inObjectName,
  409.                                 cUser) then
  410.                 begin
  411.                   { add new element to grid, then sort it }
  412.                   tempList.add(cUser) ;
  413.                   for nLoop := 1 to listGrid.rowCount do
  414.                     tempList.add(listGrid.cells[nloop-1,0]) ;
  415.                   tempList.sort ;
  416.                   listGrid.fixedRows := 0 ;
  417.                   listGrid.rowCount  := 1;
  418.                   listGrid.rowCount  := tempList.count+1 ;
  419.                   for nLoop := 1 to tempList.count do
  420.                     listGrid.cells[nloop,0] := tempList[nloop-1];
  421.                   if (listGrid.rowCount > 1) then
  422.                     listGrid.fixedRows := 1 ;
  423.                   okBox(cUser + ';Added to ' + inObjectName + ' Successfully') ;
  424.                 end
  425.               else
  426.                 alertBox('Error!;Could Not Add ' + cUser + ' to ' + inObjectName + ';;Check Your Access Privileges') ;
  427.             end
  428.           else
  429.             alertBox(cUser + ';;Is Not A User') ;
  430.         finally
  431.           tempList.free ;
  432.         end;
  433.       end;
  434.   end;
  435.  
  436. procedure TWinList.userAddGroup(sender : TObject) ;
  437.   { process 'Add member to Group' Button (specified in TWinObjEdit/Edit User) }
  438.   var
  439.     cgroup   : string ;
  440.     tempList : TStringList ;
  441.     nLoop    : word ;
  442.   begin
  443.     cgroup := space(80) ;
  444.     if inputQuery('Add ' + inObjectName + ' to Group',
  445.                   'Group Name',cgroup) then
  446.       begin
  447.         try
  448.           cgroup := upperCase(allTrim(cgroup)) ;
  449.           if (getObjType(0,cgroup) = nw_group) then
  450.             begin
  451.               tempList := TStringList.create  ;
  452.               if addUserToGroup(inServer,
  453.                                 cgroup,
  454.                                 inObjectName) then
  455.                 begin
  456.                   { add new element to grid, then sort it }
  457.                   tempList.add(inObjectName) ;
  458.                   for nLoop := 1 to listGrid.rowCount do
  459.                     tempList.add(listGrid.cells[nloop-1,0]) ;
  460.                   tempList.sort ;
  461.                   listGrid.fixedRows := 0 ;
  462.                   listGrid.rowCount  := 1;
  463.                   listGrid.rowCount  := tempList.count+1 ;
  464.                   for nLoop := 1 to tempList.count do
  465.                     listGrid.cells[nloop,0] := tempList[nloop-1];
  466.                   if (listGrid.rowCount > 1) then
  467.                     listGrid.fixedRows := 1 ;
  468.                   okBox(inObjectName + ';Added to Group Successfully') ;
  469.                 end
  470.               else
  471.                 alertBox('Error!;Could Not Add ' + inObjectName + ' to ' + cgroup + ';;Check Your Access Privileges') ;
  472.             end
  473.           else
  474.             alertBox(cGroup + ';;Is Not A Group') ;
  475.         finally
  476.           tempList.free ;
  477.         end;
  478.       end;
  479.   end;
  480.  
  481. procedure TWinList.userDelFromGroup(sender : TObject) ;
  482.   { process 'Delete Group From User'  Button (specified in TWinObjEdit) }
  483.   var
  484.     ctemp : string ;
  485.   begin
  486.     ctemp := listGrid.cells[0,listGrid.row] ;
  487.     if YesNoBox(inObjectName + ';Deleting User from Group ' +
  488.                 ctemp + ';;Are You Sure?') then
  489.       begin
  490.         if deleteUserFromGroup(inServer,
  491.                                ctemp,
  492.                                inObjectName) then
  493.           begin
  494.             listGrid.cells[0,listGrid.row] := '<Deleted>' ;
  495.             okBox(ctemp + ';;Removed from ' + inObjectName) ;
  496.           end
  497.         else
  498.           alertBox('Error Deleting User from Group;;Check Your Access Rights') ;
  499.       end;
  500.   end;
  501.  
  502. procedure TWinList.groupDelUser(sender : TObject) ;
  503.   { process 'Delete User from Group' Button }
  504.   var
  505.     ctemp : string ;
  506.   begin
  507.     ctemp := listGrid.cells[0,listGrid.row] ;
  508.     if YesNoBox('Removing User ' + ctemp + ';From Group ' +
  509.                 inObjectName + ';;Are You Sure?') then
  510.       begin
  511.         if deleteUserFromGroup(inServer,
  512.                                inObjectName,
  513.                                ctemp) then
  514.           begin
  515.             listGrid.cells[0,listGrid.row] := '<Deleted>' ;
  516.             okBox(ctemp + ';;Removed from ' + inObjectName) ;
  517.           end
  518.         else
  519.           alertBox('Error Deleting User from Group;;Check Your Access Rights') ;
  520.       end;
  521.   end;
  522.   
  523.  
  524. procedure TWinList.objSeeObjectInfo(sender : TObject) ;
  525.   { process Group's 'Info' Button }
  526.   var
  527.     ctemp : string ;
  528.   begin
  529.     ctemp := listGrid.cells[0,listGrid.row] ;
  530.     okBox('Object Name:  ' + ctemp + ';Full Name:  ' + fullName(0,ctemp)) ;
  531.   end;
  532.  
  533. procedure TWinList.showPropertyInfo(sender : TObject) ;
  534.   var
  535.     ctemp : string ;
  536.   begin
  537.     ctemp := listGrid.cells[0,listGrid.row] ;
  538.     OKBox(ctemp) ;  
  539.   end;
  540.  
  541. procedure TWinList.createNewProperty(sender: TObject) ;
  542.   var
  543.     readSecurity,
  544.     writeSecurity,
  545.     objTypeFlag    : TNWFlags ;
  546.     permanent      : boolean ;
  547.     ctext          : string ;
  548.   begin
  549.     ctext         := space(80) ;
  550.     objTypeFlag   := BF_ITEM ;
  551.     permanent     := true ;
  552.     readSecurity  := BS_LOGGED_READ ;
  553.     writeSecurity := BS_OBJECT_WRITE ;
  554.     if inputQuery(inObjectName + ': Creating New Property','Property Name:',ctext) then
  555.       begin
  556.         if createProperty(
  557.                           inServer,
  558.                           inObjectName,
  559.                           getObjType(0,inObjectName),
  560.                           ctext,
  561.                           objTypeFlag,
  562.                           permanent,
  563.                           readSecurity,
  564.                           writeSecurity) then
  565.           okBox(ctext + ';;Property Created Successfully')
  566.         else
  567.           alertBox(ctext + ';Error Creating Property') ;
  568.       end;
  569.   end;
  570.  
  571. procedure TWinList.deleteObjProperty(sender : TObject) ;
  572.   var
  573.     ctemp : string ;
  574.   begin
  575.     ctemp := strExtract(listGrid.cells[0,listGrid.row],' ',1) ;
  576.     if noYesBox(ctemp + ';Permanently Removing Property;;Are You Sure?') then
  577.       begin
  578.         if deleteProperty(inServer,inObjectName,ctemp) then
  579.           okBox(ctemp + ';;Property Deleted')
  580.         else
  581.           alertBox(ctemp + ';;Error Deleting Property!') ;
  582.       end;
  583.   end;
  584.  
  585.  
  586. procedure TWinList.queueJobDelete(sender : TObject) ;
  587.   var
  588.     jobInfo : TNWQueueJobInfo ;
  589.   begin
  590.     if noYesBox('Removing Job From Queue;;Are You Sure') then
  591.       begin
  592.         with jobInfo do begin
  593.           nServer         := inServer ;
  594.           cQueue          := getObjName(inServer,inQueue) ;
  595.           jobID           := strToIntDef(listGrid.cells[1,listGrid.row],0)  ;
  596.         end;
  597.         if (not deleteQueueJob(jobInfo)) then
  598.           alertBox('Error Removing Job from Queue') ;
  599.         onPrintJobsShow(sender) {refresh list}
  600.       end;
  601.   end;
  602.     
  603. procedure TWinList.queueJobInfo(sender : TObject) ;
  604.   var
  605.     jobInfo : TNWQueueJobInfo ;
  606.   begin
  607.     with jobInfo do begin
  608.       nServer := inServer ;
  609.       cQueue  := getObjName(inServer,inQueue) ;
  610.       jobID   := strToIntDef(listGrid.cells[1,listGrid.row],0)  ;
  611.     end;
  612.     if getQueueJobInfo(jobInfo) then
  613.       okBox('Job Info;;' + 
  614.             'Owner: '    + jobInfo.ownerName + ';' + 
  615.             'Server: '   + jobInfo.serverName + ';' + 
  616.             'QServer: '  + jobInfo.queueServerName + ';' + 
  617.             'Text: '     + jobInfo.jobDescription + ';' + 
  618.             'FileName: ' + jobInfo.jobFileName + ';' + 
  619.             'EntryDate: ' + dateTimeToStr(jobInfo.entryDateTime) + ';' +
  620.             'ExecDate: ' + dateTimeToStr(jobInfo.execDateTime) )
  621.     else
  622.       begin
  623.         alertBox('Could Not Read Job Information') ;
  624.         onPrintJobsShow(sender) ;
  625.       end;
  626.   end;
  627.  
  628. { End of Unit }
  629. end.
  630.